import java.util.Arrays;
//冒泡排序
public class BubbleSort {
    public static void main(String[] args) {
        int[] array = {1, 3, 2, 5, 4, 6, 7, 9, 8, 0};
        for (int i = 0; i < array.length - 1; i++) {
            for (int j = 0; j < array.length - 1 - i; j++) {
                if (array[j] > array[j + 1]) {
                    int num = array[j];
                    array[j] = array[j + 1];
                    array[j + 1] = num;
                }
                System.out.println(Arrays.toString(array));
            }
            System.out.println();
        }
    }
}
